package DataProcessing;
import com.example.uart.Uart;
public class LedControl {
//	public boolean Led1_On(){
//		char[] buf ={0xcc,0xee,0x01,0x09,0x01,
//				 0x00,0x00,0x00,0x00,0x00,
//				 0x00,0x00,0x00,0x00,0x00,
//				 0xff};
//			new Uart().Send_Uart(buf);
//		return true;
//	}
	public boolean Led1_On(){
		
		String send = "AT+CMGS=\"13280926608\"\nhello 22.5;34.5";
		char[] strChar =send.toCharArray();
		strChar[strChar.length]=0x1a;
		new Uart().Send_Uart(strChar);
		return true;
		
	}
	public boolean Led1_Off(){
		char[] buf ={0xcc,0xee,0x01,0x09,0x02,
				 0x00,0x00,0x00,0x00,0x00,
				 0x00,0x00,0x00,0x00,0x00,
				 0xff};
			new Uart().Send_Uart(buf);
		return false;
	}
	public boolean Led2_On(){
		char[] buf ={0xcc,0xee,0x01,0x09,0x03,
				 0x00,0x00,0x00,0x00,0x00,
				 0x00,0x00,0x00,0x00,0x00,
				 0xff};
			new Uart().Send_Uart(buf);
		return true;
	}
	public boolean Led2_Off(){
		char[] buf ={0xcc,0xee,0x01,0x09,0x04,
				 0x00,0x00,0x00,0x00,0x00,
				 0x00,0x00,0x00,0x00,0x00,
				 0xff};
			new Uart().Send_Uart(buf);
		return false;
	}
	public boolean Led3_On(){
		char[] buf ={0xcc,0xee,0x01,0x09,0x05,
				 0x00,0x00,0x00,0x00,0x00,
				 0x00,0x00,0x00,0x00,0x00,
				 0xff};
			new Uart().Send_Uart(buf);
		return true;
	}
	public boolean Led3_Off(){
		char[] buf ={0xcc,0xee,0x01,0x09,0x06,
				 0x00,0x00,0x00,0x00,0x00,
				 0x00,0x00,0x00,0x00,0x00,
				 0xff};
			new Uart().Send_Uart(buf);
		return false;
	}
}
